Optimal. Leaf size=173 \[ -\frac{a \left (3 b^2-a^2 (m+1)\right ) \tan (e+f x) \sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \, _2F_1\left (\frac{1}{2},1-\frac{m}{2};\frac{3}{2};-\tan ^2(e+f x)\right )}{f (m+1)}-\frac{b (d \sec (e+f x))^m \left (2 (m+1) \left (b^2-a^2 (m+3)\right )-a b m (m+4) \tan (e+f x)\right )}{f m \left (m^2+3 m+2\right )}+\frac{b (a+b \tan (e+f x))^2 (d \sec (e+f x))^m}{f (m+2)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19662, antiderivative size = 167, normalized size of antiderivative = 0.97, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3512, 743, 780, 245} \[ \frac{a \left (a^2-\frac{3 b^2}{m+1}\right ) \tan (e+f x) \sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \, _2F_1\left (\frac{1}{2},1-\frac{m}{2};\frac{3}{2};-\tan ^2(e+f x)\right )}{f}-\frac{b (d \sec (e+f x))^m \left (2 (m+1) \left (b^2-a^2 (m+3)\right )-a b m (m+4) \tan (e+f x)\right )}{f m \left (m^2+3 m+2\right )}+\frac{b (a+b \tan (e+f x))^2 (d \sec (e+f x))^m}{f (m+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3512
Rule 743
Rule 780
Rule 245
Rubi steps
\begin{align*} \int (d \sec (e+f x))^m (a+b \tan (e+f x))^3 \, dx &=\frac{\left ((d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \operatorname{Subst}\left (\int (a+x)^3 \left (1+\frac{x^2}{b^2}\right )^{-1+\frac{m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac{b (d \sec (e+f x))^m (a+b \tan (e+f x))^2}{f (2+m)}+\frac{\left (b (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \operatorname{Subst}\left (\int (a+x) \left (-2+\frac{a^2 (2+m)}{b^2}+\frac{a (4+m) x}{b^2}\right ) \left (1+\frac{x^2}{b^2}\right )^{-1+\frac{m}{2}} \, dx,x,b \tan (e+f x)\right )}{f (2+m)}\\ &=\frac{b (d \sec (e+f x))^m (a+b \tan (e+f x))^2}{f (2+m)}-\frac{b (d \sec (e+f x))^m \left (2 (1+m) \left (b^2-a^2 (3+m)\right )-a b m (4+m) \tan (e+f x)\right )}{f m \left (2+3 m+m^2\right )}-\frac{\left (a \left (3 b^2-a^2 (1+m)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2}\right ) \operatorname{Subst}\left (\int \left (1+\frac{x^2}{b^2}\right )^{-1+\frac{m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f (1+m)}\\ &=-\frac{a \left (3 b^2-a^2 (1+m)\right ) \, _2F_1\left (\frac{1}{2},1-\frac{m}{2};\frac{3}{2};-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{f (1+m)}+\frac{b (d \sec (e+f x))^m (a+b \tan (e+f x))^2}{f (2+m)}-\frac{b (d \sec (e+f x))^m \left (2 (1+m) \left (b^2-a^2 (3+m)\right )-a b m (4+m) \tan (e+f x)\right )}{f m \left (2+3 m+m^2\right )}\\ \end{align*}
Mathematica [A] time = 57.2557, size = 175, normalized size = 1.01 \[ \frac{\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (b \left (\left (3 a^2 (m+2)-2 b^2\right ) \left (\sec ^2(e+f x)^{m/2}-1\right )+a b m (m+2) \tan ^3(e+f x) \, _2F_1\left (\frac{3}{2},1-\frac{m}{2};\frac{5}{2};-\tan ^2(e+f x)\right )+b^2 m \tan ^2(e+f x) \sec ^2(e+f x)^{m/2}\right )+a^3 m (m+2) \tan (e+f x) \, _2F_1\left (\frac{1}{2},1-\frac{m}{2};\frac{3}{2};-\tan ^2(e+f x)\right )\right )}{f m (m+2)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.543, size = 0, normalized size = 0. \begin{align*} \int \left ( d\sec \left ( fx+e \right ) \right ) ^{m} \left ( a+b\tan \left ( fx+e \right ) \right ) ^{3}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (f x + e\right ) + a\right )}^{3} \left (d \sec \left (f x + e\right )\right )^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b^{3} \tan \left (f x + e\right )^{3} + 3 \, a b^{2} \tan \left (f x + e\right )^{2} + 3 \, a^{2} b \tan \left (f x + e\right ) + a^{3}\right )} \left (d \sec \left (f x + e\right )\right )^{m}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \tan \left (f x + e\right ) + a\right )}^{3} \left (d \sec \left (f x + e\right )\right )^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]